$highlight_theme = hexo-config("highlight_theme")

$highlight-background   = #f8f8f8

if $highlight_theme == "normal"
  $highlight-background   = #f8f8f8
  $highlight-current-line = #efefef
  $highlight-selection    = #d6d6d6
  $highlight-foreground   = #4d4d4c
  $highlight-comment      = #8e908c
  $highlight-red          = #c82829
  $highlight-orange       = #fb6d19
  $highlight-yellow       = #eab700
  $highlight-green        = #718c00
  $highlight-aqua         = #3e999f
  $highlight-blue         = #4271ae
  $highlight-purple       = #8959a8

if $highlight_theme == "night"
  $highlight-background   = #1d1f21
  $highlight-current-line = #282a2e
  $highlight-selection    = #373b41
  $highlight-foreground   = #c5c8c6
  $highlight-comment      = #969896
  $highlight-red          = #cc6666
  $highlight-orange       = #de935f
  $highlight-yellow       = #f0c674
  $highlight-green        = #b5bd68
  $highlight-aqua         = #8abeb7
  $highlight-blue         = #81a2be
  $highlight-purple       = #b294bb

if $highlight_theme == "night eighties"
  $highlight-background   = #2d2d2d
  $highlight-current-line = #393939
  $highlight-selection    = #515151
  $highlight-foreground   = #cccccc
  $highlight-comment      = #999999
  $highlight-red          = #f2777a
  $highlight-orange       = #f99157
  $highlight-yellow       = #ffcc66
  $highlight-green        = #99cc99
  $highlight-aqua         = #66cccc
  $highlight-blue         = #6699cc
  $highlight-purple       = #cc99cc

if $highlight_theme == "night blue"
  $highlight-background   = #002451
  $highlight-current-line = #00346e
  $highlight-selection    = #003f8e
  $highlight-foreground   = #ffffff
  $highlight-comment      = #7285b7
  $highlight-red          = #ff9da4
  $highlight-orange       = #ffc58f
  $highlight-yellow       = #ffeead
  $highlight-green        = #d1f1a9
  $highlight-aqua         = #99ffff
  $highlight-blue         = #bbdaff
  $highlight-purple       = #ebbbff

if $highlight_theme == "night bright"
  $highlight-background   = #000000
  $highlight-current-line = #2a2a2a
  $highlight-selection    = #424242
  $highlight-foreground   = #eaeaea
  $highlight-comment      = #969896
  $highlight-red          = #d54e53
  $highlight-orange       = #e78c45
  $highlight-yellow       = #e7c547
  $highlight-green        = #b9ca4a
  $highlight-aqua         = #70c0b1
  $highlight-blue         = #7aa6da
  $highlight-purple       = #c397d8




//======================================== Original =======================================//

// https://github.com/chriskempson/tomorrow-theme

// $highlight-background = #2d2d2d
// $highlight-current-line = #393939
// $highlight-selection = #515151
// $highlight-foreground = #cccccc
// $highlight-comment = #999999
// $highlight-red = #f2777a
// $highlight-orange = #f99157
// $highlight-yellow = #ffcc66
// $highlight-green = #99cc99
// $highlight-aqua = #66cccc
// $highlight-blue = #6699cc
// $highlight-purple = #cc99cc

$code-block
  background: $highlight-background
  margin: article-padding article-padding * 0
  padding: 15px article-padding
  border-style: solid
  border-color: color-border
  border-width: 1px 0
  overflow: auto
  color: $highlight-foreground
  font-size: 0.9em;
  line-height: 1em

$line-numbers
  color: #666
  font-size: 0.85em

figure.highlight::-webkit-scrollbar {
  width:10px;
  height:10px;
}

figure.highlight::-webkit-scrollbar-thumb { /*滚动条里面小方块*/
  border-radius: 5px;
  -webkit-box-shadow: inset 0 0 0px rgba(0,0,0,0.2);
  background: rgba(0,0,0,0.1);
}

figure.highlight::-webkit-scrollbar-track { /*滚动条里面轨道*/
  -webkit-box-shadow: inset 0 0 0px rgba(0,0,0,0.2);
  border-radius: 0;
  background: rgba(0,0,0,0);
}


.article-entry
  pre, code
    font-family: font-mono
  code
    background: rgba(208,211,248,0.2)
    color: color-default
    padding: 0 0.3em
  pre
    @extend $code-block
    code
      background: none
      text-shadow: none
      padding: 0
  .highlight
    @extend $code-block
    pre
      border: none
      margin: 0
      padding: 0
    table
      margin: 0
      width: auto
    td
      border: none
      padding: 0
    figcaption
      clearfix()
      font-size: 0.85em
      color: $highlight-comment
      line-height: 1em
      margin-bottom: 1em
      a
        float: right
    .gutter
      // 不会选中 line number
      -webkit-user-select: none;
      -moz-user-select: none;
      -ms-user-select: none;
      user-select: none;
    .gutter pre
      @extend $line-numbers
      color: #aaaaaa;
      text-align: right
      padding-right: 30px
    .line
      height: 1.7em
      line-height: 1.7em
    .line.marked
      background: $highlight-selection
  .gist
    margin: 0 article-padding * -1
    border-style: solid
    border-color: color-border
    border-width: 1px 0
    background: $highlight-background
    padding: 15px article-padding 15px 0
    .gist-file
      border: none
      font-family: font-mono
      margin: 0
      .gist-data
        background: none
        border: none
        .line-numbers
          @extend $line-numbers
          background: none
          border: none
          padding: 0 20px 0 0
        .line-data
          padding: 0 !important
      .highlight
        margin: 0
        padding: 0
        border: none
      .gist-meta
        background: $highlight-background
        color: $highlight-comment
        font: 0.85em font-sans
        text-shadow: 0 0
        padding: 0
        margin-top: 1em
        margin-left: article-padding
        a
          color: color-link
          font-weight: normal
          &:hover
            text-decoration: underline

pre
  .comment
  .title
    color: $highlight-comment
  .variable
  .attribute
  .tag
  .regexp
  .ruby .constant
  .xml .tag .title
  .xml .pi
  .xml .doctype
  .html .doctype
  .css .id
  .css .class
  .css .pseudo
    color: $highlight-red
  .number
  .preprocessor
  .built_in
  .literal
  .params
  .constant
    color: $highlight-orange
  .class
  .ruby .class .title
  .css .rules .attribute
    color: $highlight-green
  .string
  .value
  .inheritance
  .header
  .ruby .symbol
  .xml .cdata
    color: $highlight-green
  .css .hexcolor
    color: $highlight-aqua
  .function
  .python .decorator
  .python .title
  .ruby .function .title
  .ruby .title .keyword
  .perl .sub
  .javascript .title
  .coffeescript .title
    color: $highlight-blue
  .keyword
  .javascript .function
    color: $highlight-purple


if $highlight_theme == "default" {
    pre {
      color: #525252
    }

    pre .function .keyword,pre .constant {
      color: #0092db
    }

    pre .keyword,pre .attribute {
      color: #e96900
    }

    pre .number,pre .literal {
      color: #ae81ff
    }

    pre .tag,pre .tag .title,pre .change,pre .winutils,pre .flow,pre .lisp .title,pre .clojure .built_in,pre .nginx .title,pre .tex .special {
      color: #2973b7
    }

    pre .symbol,pre .symbol .string,pre .value,pre .regexp {
      color: #42b983
    }

    pre .title {
      color: #83B917
    }

    pre .tag .value,pre .string,pre .subst,pre .haskell .type,pre .preprocessor,pre .ruby .class .parent,pre .built_in,pre .sql .aggregate,pre .django .template_tag,pre .django .variable,pre .smalltalk .class,pre .javadoc,pre .django .filter .argument,pre .smalltalk .localvars,pre .smalltalk .array,pre .attr_selector,pre .pseudo,pre .addition,pre .stream,pre .envvar,pre .apache .tag,pre .apache .cbracket,pre .tex .command,pre .prompt {
      color: #42b983
    }

    pre .comment,pre .java .annotation,pre .python .decorator,pre .template_comment,pre .pi,pre .doctype,pre .shebang,pre .apache .sqbracket,pre .tex .formula {
      color: #b3b3b3
    }

    pre .deletion {
      color: #BA4545
    }

    pre .coffeescript .javascript,pre .javascript .xml,pre .tex .formula,pre .xml .javascript,pre .xml .vbscript,pre .xml .css,pre .xml .cdata {
      opacity: 0.5
    }
}






//======================================== gray theme =======================================//
if $highlight_theme == "gray" {
  /* syntax highlight*/
    figure.highlight,
    .codeblock {
        margin:         10px 0;
        line-height:    1.1em;
        color:          #333;
        padding-top:    15px;
        overflow:       hidden;
        padding: 15px 0px !important;
        border-width: 0 !important;

        table {
            display:    block;
            width:      100%;
        }
        // Reset for tag `pre` and  for class `.gutter`, `.code`, `.tag`
        pre,
        .gutter,
        .code,
        .tag {
            background-color: inherit;
            font-family: Menlo, Consolas, monospace;
            border:      none;
            padding:     0;
            margin:      0;
            // To override cursor attribute of `.tag` components
            cursor:      text;
        }
        pre {
            line-height: normal !important;
            padding-right: 0px !important;
        }
        // To align line number and line of code regardless if there is a scroll bar or not
        .gutter,
        .code {
            vertical-align: top;
        }
        // hide gutter when code is plain text
        &.plain {
            .gutter {
                display:none;
            }
        }
        // Meta bar which contains name of the file and his link
        figcaption {
            font-size:     13px;
            padding:       0 15px 20px;
            margin:        0;
            color:         #999999;

            a {
                float: right;
                color: #01579f;
            }
        }
        // Gutter which contains line numbers
        .gutter {
            border-right: 1px solid rgba(0,0,0, 0.04);
            padding:      0.3em 15px;
            -webkit-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none;
            user-select: none;

            .line {
                color: #aaaaaa;
            }
        }
        // Code container
        .code {
            padding: 0.3em 15px 0.3em 1em;
            width:   100%;

            pre {
                max-width:  auto;
                overflow-x: scroll;
                overflow-y: hidden;
            }
        }
        // All lines in gutter and code container
        .line {
            height:    1.5em !important;
            line-height: 1.5em !important;
            font-size: 13px;
        }
    }

    // Gist
    .gist {
        .line,
        .line-number {
            font-family: Menlo, Consolas, monospace;
            font-size:   1em;
            margin:      0 0 5px 0;
        }
    }

    // Highlight code coloration
    .highlight {
        // General
        .comment {
            color: #969896;
        }
        .string {
            color: #183691;
        }
        .keyword {
            color: #a71d5d;
        }
        // ApacheConf
        &.apacheconf .code {
            .common,
            .nomarkup,
            .attribute,
            .variable,
            .cbracket,
            .keyword {
                color: #0086b3;
            }
            .sqbracket {
                color: #df5000;
            }
            .section,
            .tag {
                color: #63a35c;
            }
        }
        // Bash
        &.bash .code {
            .shebang {
                color: #969896;
            }
            .literal,
            .built_in {
                color: #0086b3;
            }
            .variable {
                color: #333;
            }
            .title {
                color: #795da3;
            }
        }
        // coffescript
        &.coffeescript .code {
            .title {
                color: #795da3;
            }
            .literal,
            .built_in,
            .number {
                color: #0086b3;
            }
            .reserved,
            .attribute {
                color: #1d3e81;
            }
            .subst,
            .regexp,
            .attribute {
                color: #df5000;
            }
        }
        // C/C++
        &.cpp .code,
        &.c .code {
            .preprocessor {
                color: #df5000;
            }
            .meta-keyword {
                color: #a71d5d;
            }
            .title {
                color: #795da3;
            }
            .number,
            .built_in {
                color: #0086b3;
            }
        }
        // C#
        &.cs .code {
            .preprocessor,
            .preprocessor .keyword {
                color: #333;
            }
            .title {
                color: #795da3;
            }
            .number,
            .built_in {
                color: #0086b3;
            }
            .xmlDocTag,
            .doctag {
                color: #63a35c;
            }
        }
        // CSS
        &.css .code {
            .at_rule,
            .important,
            .meta {
                color: #a71d5d;
            }
            .attribute,
            .hexcolor,
            .number,
            .function {
                color: #0086b3;
            }
            .attr_selector,
            .value {
                color: #333;
            }
            .id,
            .class,
            .pseudo,
            .selector-pseudo {
                color: #795da3;
            }
            .tag,
            .selector-tag {
                color: #63a35c;
            }
        }
        // Diff
        &.diff .code {
            .chunk,
            .meta {
                color:       #795da3;
                font-weight: bold;
            }
            .addition {
                color:            #55a532;
                background-color: #eaffea;
            }
            .deletion {
                color:            #bd2c00;
                background-color: #ffecec;
            }
        }
        // HTTP
        &.http .code {
            .attribute,
            .attr {
                color: #183691;
            }
            .literal {
                color: #0086b3;
            }
            .request {
                color: #a71d5d;
            }
        }
        // INI
        &.ini .code {
            .title,
            .section {
                color: #795da3;
            }
            .setting,
            .attr {
                color: #a71d5d;
            }
            .value,
            .keyword {
                color: #333;
            }
        }
        // JAVA
        &.java .code {
            .title {
                color: #795da3;
            }
            .javadoc {
                color: #969896;
            }
            .meta,
            .annotation,
            .javadoctag {
                color: #a71d5d;
            }
            .number {
                color: #0086b3;
            }
            .params {
                color: #1d3e81;
            }
        }
        // JavaScript
        &.js .code {
            .built_in,
            .title {
                color: #795da3;
            }
            .javadoc {
                color: #969896;
            }
            .tag,
            .javadoctag {
                color: #a71d5d;
            }
            .tag .title {
                color: #333;
            }
            .regexp {
                color: #df5000;
            }
            .literal,
            .number {
                color: #0086b3;
            }
        }
        // JSON
        &.json .code {
            .attribute {
                color: #183691;
            }
            .number,
            .literal {
                color: #0086b3;
            }
        }
        // Makefile
        &.mak .code {
            .constant {
                color: #333;
            }
            .title {
                color: #795da3;
            }
            .keyword,
            .meta-keyword {
                color: #0086b3;
            }
        }
        // Markdown
        &.md .code {
            .value,
            .link_label,
            .strong,
            .emphasis,
            .blockquote,
            .quote,
            .section {
                color: #183691;
            }
            .link_reference,
            .symbol,
            .code {
                color: #0086b3;
            }
            .link_url,
            .link {
                text-decoration: underline;
            }
        }
        // Nginx
        &.nginx .code {
            .title,
            .attribute {
                color: #a71d5d;
            }
            .built_in,
            .literal {
                color: #0086b3;
            }
            .regexp {
                color: #183691;
            }
            .variable {
                color: #333;
            }
        }
        // Objective-C
        &.objectivec .code {
            .preprocessor,
            .meta {
                color: #a71d5d;

                .title {
                    color: #df5000;
                }
            }
            .meta-string {
                color: #183691;
            }
            .title {
                color: #795da3;
            }
            .literal,
            .number,
            .built_in {
                color: #0086b3;
            }
        }
        // Perl
        &.perl .code {
            .sub {
                color: #795da3;
            }
            .title {
                color: #795da3;
            }
            .regexp {
                color: #df5000;
            }
        }
        // PHP
        &.php .code {
            .phpdoc,
            .doctag {
                color: #a71d5d;
            }
            .regexp {
                color: #df5000;
            }
            .literal,
            .number {
                color: #0086b3;
            }
            .title {
                color: #795da3;
            }
        }
        // Python
        &.python .code {
            .decorator,
            .title,
            .meta {
                color: #795da3;
            }
            .number {
                color: #0086b3;
            }
        }
        // Ruby
        &.ruby .code {
            .parent,
            .title {
                color: #795da3;
            }
            .prompt,
            .constant,
            .number,
            .subst .keyword,
            .symbol {
                color: #0086b3;
            }
        }
        // SQL
        &.sql {
            .built_in {
                color: #a71d5d;
            }
            .number {
                color: #0086b3;
            }
        }
        // XML, HTML
        &.xml {
            .tag {
                color: #333;
            }
            .value {
                color: #183691;
            }
            .attribute,
            .attr {
                color: #795da3;
            }
            .title,
            .name {
                color: #63a35c;
            }
        }
        // Puppet
        &.puppet {
            .title {
                color: #795da3;
            }
            .function {
                color: #0086b3;
            }
            .name {
                color: #a71d5d;
            }
            .attr {
                color: #0086b3;
            }
        }
        // LESS
        &.less {
            .tag,
            .at_rule {
                color: #a71d5d;
            }
            .number,
            .hexcolor,
            .function,
            .attribute {
                color: #0086b3;
            }
            .built_in {
                color: #df5000;
            }
            .id,
            .pseudo,
            .class,
            .selector-id,
            .selector-class,
            .selector-tag {
                color: #795da3;
            }
        }
        // SCSS
        &.scss {
            .tag,
            .at_rule,
            .important {
                color: #a71d5d;
            }
            .number,
            .hexcolor,
            .function,
            .attribute {
                color: #0086b3;
            }
            .variable {
                color: #333;
            }
            .built_in {
                color: #df5000;
            }
            .id,
            .pseudo,
            .class,
            .preprocessor,
            .selector-class,
            .selector-id {
                color: #795da3;
            }
            .tag,
            .selector-tag {
                color: #63a35c;
            }
        }
        // Stylus
        &.stylus {
            .at_rule {
                color: #a71d5d;
            }
            .tag,
            .selector-tag {
                color: #63a35c;
            }
            .number,
            .hexcolor,
            .attribute,
            .params {
                color: #0086b3;
            }
            .class,
            .id,
            .pseudo,
            .title,
            .selector-id,
            .selector-pseudo,
            .selector-class {
                color: #795da3;
            }
        }
        // Go
        &.go {
            .typename {
                color: #a71d5d;
            }
            .built_in,
            .constant {
                color: #0086b3;
            }
        }
        // Swift
        &.swift {
            .preprocessor {
                color: #a71d5d;
            }
            .title {
                color: #795da3;
            }
            .built_in,
            .number,
            .type {
                color: #0086b3;
            }
        }
        // YAML
        &.yml {
            .line,
            .attr {
                color: #63a35c;
            }
            .line,
            .string,
            .type,
            .literal,
            .meta {
                color: #183691;
            }
            .number {
                color: #0086b3;
            }
        }
    }

} else{
  

}